---
/* eslint max-lines: 'off' */

import NavPagination from '../components/NavPagination.astro';
import { asset, fetchData } from '../lib/data.js';

const { class: clazz } = Astro.props;
const users = await fetchData('users');
---

<entities-crud
	type="users"
	class:list={['block overflow-hidden shadow', clazz]}
>
	<div
		class="p-4 bg-white block sm:flex items-center justify-between border-b border-gray-200 lg:mt-1.5 dark:bg-gray-800 dark:border-gray-700"
	>
		<div class="w-full mb-1">
			<div class="mb-4">
				<nav class="flex mb-5" aria-label="Breadcrumb">
					<ol
						class="inline-flex items-center space-x-1 text-sm font-medium md:space-x-2"
					>
						<li class="inline-flex items-center">
							<a
								href="#"
								class="inline-flex items-center text-gray-700 hover:text-primary-600 dark:text-gray-300 dark:hover:text-white"
							>
								<svg
									class="w-5 h-5 mr-2.5"
									fill="currentColor"
									viewBox="0 0 20 20"
									xmlns="http://www.w3.org/2000/svg"
									><path
										d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"
									></path></svg
								>
								Home
							</a>
						</li>
						<li>
							<div class="flex items-center">
								<svg
									class="w-6 h-6 text-gray-400"
									fill="currentColor"
									viewBox="0 0 20 20"
									xmlns="http://www.w3.org/2000/svg"
									><path
										fill-rule="evenodd"
										d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
										clip-rule="evenodd"></path></svg
								>
								<a
									href="#"
									class="ml-1 text-gray-700 hover:text-primary-600 md:ml-2 dark:text-gray-300 dark:hover:text-white"
									>Users</a
								>
							</div>
						</li>
						<li>
							<div class="flex items-center">
								<svg
									class="w-6 h-6 text-gray-400"
									fill="currentColor"
									viewBox="0 0 20 20"
									xmlns="http://www.w3.org/2000/svg"
									><path
										fill-rule="evenodd"
										d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
										clip-rule="evenodd"></path></svg
								>
								<span
									class="ml-1 text-gray-400 md:ml-2 dark:text-gray-500"
									aria-current="page">List</span
								>
							</div>
						</li>
					</ol>
				</nav>
				<h1
					class="text-xl font-semibold text-gray-900 sm:text-2xl dark:text-white"
				>
					All users
				</h1>
			</div>
			<div class="sm:flex">
				<div
					class="items-center hidden mb-3 sm:flex sm:divide-x sm:divide-gray-100 sm:mb-0 dark:divide-gray-700"
				>
					<form class="lg:pr-3" action="#" method="GET">
						<label for="users-search" class="sr-only">Search</label>
						<div class="relative mt-1 lg:w-64 xl:w-96">
							<input
								type="text"
								name="email"
								id="users-search"
								class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
								placeholder="Search for users"
							/>
						</div>
					</form>
					<div class="flex pl-0 mt-3 space-x-1 sm:pl-2 sm:mt-0">
						<a
							href="#"
							class="inline-flex justify-center p-1 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
						>
							<svg
								class="w-6 h-6"
								fill="currentColor"
								viewBox="0 0 20 20"
								xmlns="http://www.w3.org/2000/svg"
								><path
									fill-rule="evenodd"
									d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z"
									clip-rule="evenodd"></path></svg
							>
						</a>
						<a
							href="#"
							class="inline-flex justify-center p-1 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
						>
							<svg
								class="w-6 h-6"
								fill="currentColor"
								viewBox="0 0 20 20"
								xmlns="http://www.w3.org/2000/svg"
								><path
									fill-rule="evenodd"
									d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z"
									clip-rule="evenodd"></path></svg
							>
						</a>
						<a
							href="#"
							class="inline-flex justify-center p-1 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
						>
							<svg
								class="w-6 h-6"
								fill="currentColor"
								viewBox="0 0 20 20"
								xmlns="http://www.w3.org/2000/svg"
								><path
									fill-rule="evenodd"
									d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z"
									clip-rule="evenodd"></path></svg
							>
						</a>
						<a
							href="#"
							class="inline-flex justify-center p-1 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
						>
							<svg
								class="w-6 h-6"
								fill="currentColor"
								viewBox="0 0 20 20"
								xmlns="http://www.w3.org/2000/svg"
								><path
									d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
								></path></svg
							>
						</a>
					</div>
				</div>
				<div class="flex items-center ml-auto space-x-2 sm:space-x-3">
					<!-- NOTE: Not implemented (see `./CrudProducts` for reference) -->
					<!-- <button
						type="button"
						data-refresh
						class="inline-flex items-center justify-center w-1/2 px-3 py-2 text-sm font-medium text-center text-white rounded-lg bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 sm:w-auto dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"
					>
						<svg
							class="w-5 h-5 mr-2 -ml-1"
							fill="none"
							stroke="currentColor"
							stroke-width="1.5"
							viewBox="0 0 24 24"
							xmlns="http://www.w3.org/2000/svg"
							aria-hidden="true"
						>
							<path
								stroke-linecap="round"
								stroke-linejoin="round"
								d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"
							></path>
						</svg>
						Refresh
					</button> -->
					<button
						type="button"
						data-modal-target="add-user-modal"
						data-modal-toggle="add-user-modal"
						class="inline-flex items-center justify-center w-1/2 px-3 py-2 text-sm font-medium text-center text-white rounded-lg bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 sm:w-auto dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"
					>
						<svg
							class="w-5 h-5 mr-2 -ml-1"
							fill="currentColor"
							viewBox="0 0 20 20"
							xmlns="http://www.w3.org/2000/svg"
							><path
								fill-rule="evenodd"
								d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z"
								clip-rule="evenodd"></path></svg
						>
						Add user
					</button>
					<a
						href="#"
						class="inline-flex items-center justify-center w-1/2 px-3 py-2 text-sm font-medium text-center text-gray-900 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:ring-primary-300 sm:w-auto dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700"
					>
						<svg
							class="w-5 h-5 mr-2 -ml-1"
							fill="currentColor"
							viewBox="0 0 20 20"
							xmlns="http://www.w3.org/2000/svg"
							><path
								fill-rule="evenodd"
								d="M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm5 6a1 1 0 10-2 0v3.586l-1.293-1.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V8z"
								clip-rule="evenodd"></path></svg
						>
						Export
					</a>
				</div>
			</div>
		</div>
	</div>
	<div class="flex flex-col">
		<div class="overflow-x-auto">
			<div class="inline-block min-w-full align-middle">
				<div class="overflow-hidden shadow">
					<table
						class="min-w-full divide-y divide-gray-200 table-fixed dark:divide-gray-600"
					>
						<thead class="bg-gray-100 dark:bg-gray-700">
							<tr>
								<th scope="col" class="p-4">
									<div class="flex items-center">
										<input
											id="checkbox-all"
											aria-describedby="checkbox-1"
											type="checkbox"
											class="w-4 h-4 border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 dark:focus:ring-primary-600 dark:ring-offset-gray-800 dark:bg-gray-700 dark:border-gray-600"
										/>
										<label for="checkbox-all" class="sr-only">checkbox</label>
									</div>
								</th>
								<th
									scope="col"
									class="p-4 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400"
								>
									Name
								</th>
								<th
									scope="col"
									class="p-4 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400"
								>
									Biography
								</th>
								<th
									scope="col"
									class="p-4 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400"
								>
									Position
								</th>
								<th
									scope="col"
									class="p-4 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400"
								>
									Country
								</th>
								<th
									scope="col"
									class="p-4 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400"
								>
									Status
								</th>
								<th
									scope="col"
									class="p-4 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400"
								>
									Actions
								</th>
							</tr>
						</thead>
						<tbody
							class="bg-white divide-y divide-gray-200 dark:bg-gray-800 dark:divide-gray-700"
						>
							{
								users.map((user) => (
									<div>
										<tr class="hover:bg-gray-100 dark:hover:bg-gray-700">
											<td class="w-4 p-4">
												<div class="flex items-center">
													<input
														id="checkbox-{{ .id }}"
														aria-describedby="checkbox-1"
														type="checkbox"
														class="w-4 h-4 border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 dark:focus:ring-primary-600 dark:ring-offset-gray-800 dark:bg-gray-700 dark:border-gray-600"
													/>
													<label for="checkbox-{{ .id }}" class="sr-only">
														checkbox
													</label>
												</div>
											</td>
											<td class="flex items-center p-4 mr-12 space-x-6 whitespace-nowrap">
												<img
													class="w-10 h-10 rounded-full"
													src={asset(`/images/users/${user.avatar}`)}
													alt={`${user.name} avatar`}
												/>
												<div class="text-sm font-normal text-gray-500 dark:text-gray-400">
													<div class="text-base font-semibold text-gray-900 dark:text-white">
														{user.name}
													</div>
													<div class="text-sm font-normal text-gray-500 dark:text-gray-400">
														{user.email}
													</div>
												</div>
											</td>
											<td class="max-w-sm p-4 overflow-hidden text-base font-normal text-gray-500 truncate xl:max-w-xs dark:text-gray-400">
												{user.biography}
											</td>
											<td class="p-4 text-base font-medium text-gray-900 whitespace-nowrap dark:text-white">
												{user.position}
											</td>
											<td class="p-4 text-base font-medium text-gray-900 whitespace-nowrap dark:text-white">
												{user.country}
											</td>
											<td class="p-4 text-base font-normal text-gray-900 whitespace-nowrap dark:text-white">
												<div class="flex items-center">
													{user.status === 'Active' ? (
														<div class="h-2.5 w-2.5 rounded-full bg-green-400 mr-2" />
													) : (
														<div class="h-2.5 w-2.5 rounded-full bg-red-500 mr-2" />
													)}
													{user.status}
												</div>
											</td>
											<td class="p-4 space-x-2 whitespace-nowrap">
												<button
													type="button"
													data-modal-target="edit-user-modal"
													data-modal-toggle="edit-user-modal"
													class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white rounded-lg bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"
												>
													<svg
														class="w-4 h-4 mr-2"
														fill="currentColor"
														viewBox="0 0 20 20"
														xmlns="http://www.w3.org/2000/svg"
													>
														<>
															<path d="M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z" />
															<path
																fill-rule="evenodd"
																d="M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"
																clip-rule="evenodd"
															/>
														</>
													</svg>
													Edit user
												</button>
												<button
													type="button"
													data-modal-target="delete-user-modal"
													data-modal-toggle="delete-user-modal"
													class="inline-flex items-center px-3 py-2 text-sm font-medium text-center text-white bg-red-600 rounded-lg hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:focus:ring-red-900"
												>
													<svg
														class="w-4 h-4 mr-2"
														fill="currentColor"
														viewBox="0 0 20 20"
														xmlns="http://www.w3.org/2000/svg"
													>
														<path
															fill-rule="evenodd"
															d="M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z"
															clip-rule="evenodd"
														/>
													</svg>
													Delete user
												</button>
											</td>
										</tr>
									</div>
								))
							}
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>

	<!-- Edit User Modal -->
	<div
		class="fixed left-0 right-0 z-50 items-center justify-center hidden overflow-x-hidden overflow-y-auto top-4 md:inset-0 h-modal sm:h-full"
		id="edit-user-modal"
	>
		<div class="relative w-full h-full max-w-2xl px-4 md:h-auto">
			<!-- Modal content -->
			<div class="relative bg-white rounded-lg shadow dark:bg-gray-800">
				<!-- Modal header -->
				<div
					class="flex items-start justify-between p-5 border-b rounded-t dark:border-gray-700"
				>
					<h3 class="text-xl font-semibold dark:text-white">Edit user</h3>
					<button
						type="button"
						class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-700 dark:hover:text-white"
						data-modal-toggle="edit-user-modal"
					>
						<svg
							class="w-5 h-5"
							fill="currentColor"
							viewBox="0 0 20 20"
							xmlns="http://www.w3.org/2000/svg"
							><path
								fill-rule="evenodd"
								d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
								clip-rule="evenodd"></path></svg
						>
					</button>
				</div>
				<!-- Modal body -->
				<div class="p-6 space-y-6">
					<form action="#">
						<div class="grid grid-cols-6 gap-6">
							<div class="col-span-6 sm:col-span-3">
								<label
									for="first-name"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>First Name</label
								>
								<input
									type="text"
									name="first-name"
									value="Bonnie"
									id="first-name"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="Bonnie"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="last-name"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Last Name</label
								>
								<input
									type="text"
									name="last-name"
									value="Green"
									id="last-name"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="Green"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="email"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Email</label
								>
								<input
									type="email"
									name="email"
									value="bonnie@flowbite.com"
									id="email"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="example@company.com"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="position"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Position</label
								>
								<input
									type="text"
									name="position"
									value="React Developer"
									id="position"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="e.g. React developer"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="current-password"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Current Password</label
								>
								<input
									type="password"
									name="current-password"
									value="••••••••"
									id="current-password"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="••••••••"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="new-password"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>New Password</label
								>
								<input
									type="password"
									name="new-password"
									value="••••••••"
									id="new-password"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="••••••••"
									required
								/>
							</div>
							<div class="col-span-6">
								<label
									for="biography"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Biography</label
								>
								<textarea
									id="biography"
									rows="4"
									class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="👨‍💻Full-stack web developer. Open-source contributor."
									>👨‍💻Full-stack web developer. Open-source contributor.</textarea
								>
							</div>
						</div>
					</form>
					<!-- Modal footer -->
					<div
						class="items-center p-6 border-t border-gray-200 rounded-b dark:border-gray-700"
					>
						<button
							class="text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"
							type="submit">Save all</button
						>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- Add User Modal -->
	<div
		class="fixed left-0 right-0 z-50 items-center justify-center hidden overflow-x-hidden overflow-y-auto top-4 md:inset-0 h-modal sm:h-full"
		id="add-user-modal"
	>
		<div class="relative w-full h-full max-w-2xl px-4 md:h-auto">
			<!-- Modal content -->
			<div class="relative bg-white rounded-lg shadow dark:bg-gray-800">
				<!-- Modal header -->
				<div
					class="flex items-start justify-between p-5 border-b rounded-t dark:border-gray-700"
				>
					<h3 class="text-xl font-semibold dark:text-white">Add new user</h3>
					<button
						type="button"
						class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-700 dark:hover:text-white"
						data-modal-toggle="add-user-modal"
					>
						<svg
							class="w-5 h-5"
							fill="currentColor"
							viewBox="0 0 20 20"
							xmlns="http://www.w3.org/2000/svg"
							><path
								fill-rule="evenodd"
								d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
								clip-rule="evenodd"></path></svg
						>
					</button>
				</div>
				<!-- Modal body -->
				<div class="p-6 space-y-6">
					<form action="#">
						<div class="grid grid-cols-6 gap-6">
							<div class="col-span-6 sm:col-span-3">
								<label
									for="first-name"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>First Name</label
								>
								<input
									type="text"
									name="first-name"
									id="first-name"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="Bonnie"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="last-name"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Last Name</label
								>
								<input
									type="text"
									name="last-name"
									id="last-name"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="Green"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="email"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Email</label
								>
								<input
									type="email"
									name="email"
									id="email"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="example@company.com"
									required
								/>
							</div>
							<div class="col-span-6 sm:col-span-3">
								<label
									for="position"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Position</label
								>
								<input
									type="text"
									name="position"
									id="position"
									class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="e.g. React developer"
									required
								/>
							</div>
							<div class="col-span-6">
								<label
									for="biography"
									class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
									>Biography</label
								>
								<textarea
									id="biography"
									rows="4"
									class="block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
									placeholder="👨‍💻Full-stack web developer. Open-source contributor."
								></textarea>
							</div>
						</div>
					</form>
					<!-- Modal footer -->
					<div
						class="items-center p-6 border-t border-gray-200 rounded-b dark:border-gray-700"
					>
						<button
							class="text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"
							type="submit">Add user</button
						>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- Delete User Modal -->
	<div
		class="fixed left-0 right-0 z-50 items-center justify-center hidden overflow-x-hidden overflow-y-auto top-4 md:inset-0 h-modal sm:h-full"
		id="delete-user-modal"
	>
		<div class="relative w-full h-full max-w-md px-4 md:h-auto">
			<!-- Modal content -->
			<div class="relative bg-white rounded-lg shadow dark:bg-gray-800">
				<!-- Modal header -->
				<div class="flex justify-end p-2">
					<button
						type="button"
						class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-700 dark:hover:text-white"
						data-modal-toggle="delete-user-modal"
					>
						<svg
							class="w-5 h-5"
							fill="currentColor"
							viewBox="0 0 20 20"
							xmlns="http://www.w3.org/2000/svg"
							><path
								fill-rule="evenodd"
								d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
								clip-rule="evenodd"></path></svg
						>
					</button>
				</div>
				<!-- Modal body -->
				<div class="p-6 pt-0 text-center">
					<svg
						class="w-16 h-16 mx-auto text-red-600"
						fill="none"
						stroke="currentColor"
						viewBox="0 0 24 24"
						xmlns="http://www.w3.org/2000/svg"
						><path
							stroke-linecap="round"
							stroke-linejoin="round"
							stroke-width="2"
							d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg
					>
					<h3 class="mt-5 mb-6 text-lg text-gray-500 dark:text-gray-400">
						Are you sure you want to delete this user?
					</h3>
					<a
						href="#"
						class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-base inline-flex items-center px-3 py-2.5 text-center mr-2 dark:focus:ring-red-800"
					>
						Yes, I'm sure
					</a>
					<a
						href="#"
						class="text-gray-900 bg-white hover:bg-gray-100 focus:ring-4 focus:ring-primary-300 border border-gray-200 font-medium inline-flex items-center rounded-lg text-base px-3 py-2.5 text-center dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700"
						data-modal-toggle="delete-user-modal"
					>
						No, cancel
					</a>
				</div>
			</div>
		</div>
	</div>

	<NavPagination />
</entities-crud>

<script>
	import './CrudEntities.client.js';
</script>
